package cn.wusifx.zabbix.request.builder.user;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/usergroup/update
 */
public class UserGroupUpdateRequestBuilder extends UpdateRequestBuilder {
    private String usrgrpId;
    public UserGroupUpdateRequestBuilder(String auth) {
        super("usergroup.update", auth);
    }

    public UserGroupUpdateRequestBuilder(Long id, String auth) {
        super("usergroup.update", id, auth);
    }

    public String getUsrgrpId() {
        return usrgrpId;
    }

    public UserGroupUpdateRequestBuilder setUsrgrpId(String usrgrpId) {
        this.usrgrpId = usrgrpId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("usrgrpid",usrgrpId);
        return baseRequest;
    }
}
